package objects.data;

import objects.ObjectCodes;
import utils.Utils;

import com.google.gson.Gson;

public class RegisterData implements ObjectCodes{
	public String user;
	public String pass;
	public String email;
	
	public RegisterData(){}
	
	public RegisterData(String u, String p, String e)
	{
		this.user = u;
		//this.pass = Utils.getMd5Digest(p);
		this.pass = p;
		this.email = e;
	}
	
	public String toString()
	{
		return CLI_REGISTER+"|"+ new Gson().toJson(this);
	}
	
	public static RegisterData fromJSon(String json)
	{
		return new Gson().fromJson(json,RegisterData.class);
	}
}
